package priv.winnine.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import priv.winnine.annotation.CommonCheck;
import priv.winnine.annotation.InterfaceExecTimeLog;
import priv.winnine.entity.enums.ResultEnum;
import priv.winnine.exception.ResultException;
import priv.winnine.service.TestService;

@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping("/test")
    @InterfaceExecTimeLog
    @CommonCheck(checkDate = true, checkTime = true)
    public Object test() {
        // throw new ResultException(ResultEnum.SUCCESS);
        // throw new ResultException(ResultEnum.SUCCESS, "123");
        return testService.test();
    }

}
